#ifndef DILATATION_HPP
#define DILATATION_HPP

#include <unordered_map>
#include <map>
#include <include/graph.hpp>
#include <include/pair_of_ints.hpp>
#include <include/distributions.hpp>

class Dilatation {

    //typedef typename std::unordered_map<PairOfInts,bool> * hashmapOfEdgesPtr;
    typedef typename std::map<PairOfInts,bool> * hashmapOfEdgesPtr;
private:
    Graph * graph;
    hashmapOfEdgesPtr edgesIds;
    //std::unordered_map<int,int> * edgesIds;
    int * getFirstPermutation(int numberOfVertices);
    int improveDilatation(int * permutation, int graphDilatation, int numberOfVertices);

public:
    Dilatation();
    ~Dilatation();
    Dilatation(Graph * graph);

    void buildHashmap();
    int getDilatation();
    int getDilatation(Distributions distributions);
    bool lowerBoundReached(int lowerBound, int graphDilatation);
    void writeInfoToCout(int numberOfVertices, int graphsDiameter, int lowerBound);
};

#endif // DILATATION_HPP
